﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="detail.aspx.cs" Inherits="StoreWeb.system.order.detail" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css">
        table, th, td {
            border: 1px solid #333;
            border-collapse: collapse;
            line-height: 40px;
            font-size: 12px;
            text-align: center;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div style="text-align: center;">
            <!--startprint-->
            <table style="width: 900px;" align="center">
                <tr>
                    <td colspan="8"><b style="font-size: 14px;">绯特西服定制订单</b>
                    </td>
                </tr>
                <tr>
                    <td width="89">订单号</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.code %></td>
                    <td width="89">姓名</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.membername %></td>
                    <td width="89">手机</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.membermobile %></td>
                    <td width="89">邮箱</td>
                    <td style="text-align: left; padding-left: 5px;"><%=member!=null?member.emal:""%></td>
                </tr>
                <tr>
                    <td>收货地址</td>
                    <td colspan="5" style="text-align: left; padding-left: 5px;"><%=order.s_province+order.s_city+order.s_county+order.address%></td>
                    <td>生日</td>
                    <td style="text-align: left; padding-left: 5px;"><%=member!=null?member.birthday:""%></td>
                </tr>
                <tr>
                    <td>下单日期</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.createtime %></td>
                    <td>预交日期</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.quyitime %></td>
                    <td>标签</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.label +(String.IsNullOrEmpty(order.lableextension)?"":"("+order.lableextension+")")%></td>
                    <td>来源</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.source %></td>
                </tr>
                <tr>
                    <td>订单属性</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.attribute==1?"正常":order.attribute==2?"重做":"赠送" %></td>
                    <td>身高</td>
                    <td style="text-align: left; padding-left: 5px;"><%=member!=null?member.height:""%></td>
                    <td>体重</td>
                    <td style="text-align: left; padding-left: 5px;"><%=member!=null?member.weight:""%></td>
                    <td>性别</td>
                    <td style="text-align: left; padding-left: 5px;"><%=member!=null?member.sex.ToString()=="0"?"保密":member.sex.ToString()=="1"?"男":"女":""%></td>
                </tr>
                <tr>
                    <td>定制类别</td>
                    <td style="text-align: left; padding-left: 5px;"><%=order.cInvCName %></td>
                    <td style="text-align: left; padding-left: 5px;">体型</td>
                    <td colspan="5"></td>
                </tr>
                <tr>
                    <td>面料款式</td>
                    <td style="text-align: left; padding-left: 5px;" colspan="7"><%=order.cInvprice+" "+inventory.cInvStd+" "+order.cInvnote+" "+order.cinvstd+" "+ order.size+" "+order.cinvstdbackup+" "+ order.sizebackup%></td>
                </tr>
                <%=orderview %>
                <tr>
                    <td>备注</td>
                    <td colspan="7" style="text-align: left; padding-left: 5px;">
                        <%=order.note %>
                    </td>
                </tr>
                <tr>
                    <td>附件图片</td>
                    <td colspan="7" style="text-align: left; padding-left: 5px;">
                        <%
                            foreach (var imgurl in order.imgs.Split('|'))
                            {
                                if (!string.IsNullOrEmpty(imgurl))
                                    Response.Write("<img src='" + imgurl + "' style='width:270px;height:270px'/>");
                            }
                        %>
                    </td>
                </tr>
            </table>
            <!--endprint-->
            <table width="900" border="1" cellpadding="3" style="border-top: 0px" cellspacing="0" bordercolor="#666666" align="center">
                <tbody>
                    <tr height="32">
                        <td align="center">
                            <a href="javascript:;" onclick="doPrint()" style="font-size: xx-large;">打印订单</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <script type="text/javascript">
            function doPrint() {
                bdhtml = window.document.body.innerHTML;
                sprnstr = "<!--startprint-->";
                eprnstr = "<!--endprint-->";
                prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
                prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
                window.document.body.innerHTML = prnhtml;
                window.print();
                parent.window.location.href = 'list.aspx';
            }
        </script>
    </form>
</body>
</html>
